package com.bw.admin.controller;

import com.bw.admin.service.AdminService;
import com.bw.common.domain.Admin;
import com.bw.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：HaoYunde
 * @Package：com.bw.admin.controller
 * @Project：hyd-boot
 * @name：AdminController
 * @Date：2024/6/17 8:58
 */
@RestController
@RequestMapping("/admin")
public class AdminController {
    @Autowired
    public AdminService adminService;


    @GetMapping("/findAdminByadminPhone")
    public Result<Admin> findAdminByadminPhone(@RequestParam String adminName){
        Admin admin=adminService.findAdminByadminPhone(adminName);
        return Result.success(admin);
    }
}
